export default [
  {
    name: '联盟链',
    resourceUrl: '/dashboard/fabric',
    key: 'fabric',
    type: 'menu',
    children: [
      {
        name: '新建联盟',
        resourceUrl: '/api/v1/consortium',
        key: 'fabric-league-create',
        type: 'page',
        method: '',
      },
      {
        name: '新建组织',
        resourceUrl: '/api/v1/organization',
        key: 'fabric-org-create',
        type: 'page',
        method: '',
      },
      {
        name: '区块链浏览器',
        resourceUrl: '/api/v1/consortium/*/channel/*/browser/board',
        key: 'fabric-browser',
        type: 'page',
        method: '',
      },
      {
        name: '组织管理',
        resourceUrl: '/api/v1/consortium/*/organization',
        method: '',
        key: 'fabric-org',
        type: 'page',
        children: [
          {
            name: '申请添加组织',
            resourceUrl: '/api/v1/organization/apply-join-consortium',
            key: 'fabric-org-apply',
            method: '',
            type: 'button',
          },
          {
            name: '投票管理',
            resourceUrl: '/api/v1/event/*/operation',
            key: 'fabric-org-vote',
            method: '',
            type: 'button',
          },
        ],
      },
      {
        name: '通道管理',
        resourceUrl: '/api/v1/consortium/*/channel/*/*',
        method: '',
        key: 'fabric-channel',
        type: 'page',
        children: [
          {
            name: '创建通道',
            resourceUrl: '/api/v1/consortium/channel',
            key: 'fabric-channel-create',
            method: '',
            type: 'button',
          },
          {
            name: '申请加入',
            resourceUrl: '/api/v1/consortium/*/channel/*/addorgs',
            key: 'fabric-channel-apply',
            method: '',
            type: 'button',
          },
          {
            name: '组织管理',
            resourceUrl: '/api/v1/consortium/channel/*/organization/*/*',
            key: 'fabric-channel-org',
            method: '',
            type: 'button',
          },
          {
            name: '修改通道配置',
            resourceUrl: '/api/v1/channel/config/update',
            key: 'fabric-channel-config',
            method: '',
            type: 'button',
          },
        ],
      },
      {
        name: '链码管理',
        resourceUrl: '/api/v1/consortium/*/chaincode/*/*',
        method: '',
        key: 'fabric-chaincode',
        type: 'page',
        children: [
          {
            name: '添加链码',
            resourceUrl: '/api/v1/consortium/chaincode',
            key: 'fabric-chaincode-add',
            method: '',
            type: 'button',
          },
          {
            name: '策略管理',
            resourceUrl: '/api/v1/policy/:consortiumId/*/*',
            key: 'fabric-chaincode-strategy',
            method: '',
            type: 'button',
          },
          {
            name: '安装',
            resourceUrl: '/api/v1/consortium/chaincode/*/install',
            key: 'fabric-chaincode-install',
            method: '',
            type: 'button',
          },
          {
            name: '部署',
            resourceUrl: '/api/v1/consortium/chaincode/*/deploy',
            key: 'fabric-chaincode-deploy',
            method: '',
            type: 'button',
          },
          {
            name: '升级',
            resourceUrl: '/api/v1/consortium/chaincode/:chaincodeId/upgrade',
            key: 'fabric-chaincode-upgrade',
            method: '',
            type: 'button',
          },
          {
            name: '删除',
            resourceUrl: '/api/v1/consortium/chaincode/*',
            key: 'fabric-chaincode-delete',
            method: 'DELETE',
            type: 'button',
          },
        ],
      },
      {
        name: '节点管理',
        resourceUrl: '/api/v1/organization/*/user/node',
        method: '',
        key: 'org-peer',
        type: 'page',
        children: [
          {
            name: '新增节点',
            resourceUrl: '/api/v1/organization/*/node',
            key: 'org-peer-add',
            method: '',
            type: 'button',
          },
          {
            name: '删除',
            resourceUrl: '/api/v1/organization/*/node',
            key: 'org-peer-delete',
            method: 'DELETE',
            type: 'button',
          },
          {
            name: '启用',
            resourceUrl: '/api/v1/organization/*/node/start',
            key: 'org-peer-start',
            method: '',
            type: 'button',
          },
          {
            name: '暂停',
            resourceUrl: '/api/v1/organization/*/node/stop',
            key: 'org-peer-stop',
            method: '',
            type: 'button',
          },
          {
            name: '修改配置',
            resourceUrl: '/api/v1/organization/*/node/config',
            key: 'org-peer-config',
            method: '',
            type: 'button',
          },
          {
            name: '节点升级',
            resourceUrl: '/api/v1/organization/*/node/upgrade',
            key: 'org-peer-upgrade',
            method: '',
            type: 'button',
          },
          {
            name: '吊销节点证书',
            resourceUrl: '/api/v1/certificate/revoke',
            key: 'org-peer-revoke',
            method: '',
            type: 'button',
          },
        ],
      },
      {
        name: '证书管理',
        resourceUrl: '/api/v1/certificate/*/*/*',
        key: 'org-certificate',
        method: '',
        type: 'page',
        children: [
          {
            name: '创建证书',
            resourceUrl: '/api/v1/certificate',
            key: 'org-certificate-create',
            method: '',
            type: 'button',
          },
          {
            name: '下载证书',
            resourceUrl: '/api/v1/certificate/*/download',
            key: 'org-certificate-download',
            method: '',
            type: 'button',
          },
          {
            name: '查看证书',
            resourceUrl: '/api/v1/certificate/*',
            key: 'org-certificate-detail',
            method: '',
            type: 'button',
          },
          {
            name: '修改证书',
            resourceUrl: '/api/v1/certificate/*/update',
            key: 'org-certificate-update',
            method: '',
            type: 'button',
          },
          {
            name: '解冻/冻结证书',
            resourceUrl: '/api/v1/certificate/frozen',
            key: 'org-certificate-frozen',
            method: '',
            type: 'button',
          },
          {
            name: '注销证书',
            resourceUrl: '/api/v1/certificate/revoke',
            key: 'org-certificate-revoke',
            method: '',
            type: 'button',
          },
        ],
      },
    ],
  },
  {
    name: '用户中心',
    resourceUrl: '/dashboard/user',
    key: 'user',
    type: 'menu',
    children: [
      {
        name: '账户管理',
        resourceUrl: '/api/v1/user/list',
        method: '',
        key: 'user-account',
        type: 'page',
        children: [
          {
            name: '新建账户',
            resourceUrl: '/api/v1/user/register',
            key: 'user-account-add',
            method: '',
            type: 'button',
          },
          {
            name: '修改',
            resourceUrl: '/api/v1/user/update-info',
            key: 'user-account-update',
            method: '',
            type: 'button',
          },
          {
            name: '冻结/解冻账户',
            resourceUrl: '/api/v1/user/update-status',
            key: 'user-account-frozen',
            method: '',
            type: 'button',
          },
          {
            name: '重置密码',
            resourceUrl: '/api/v1/user/reset-pwd',
            key: 'user-account-resetPWd',
            method: '',
            type: 'button',
          },
          {
            name: '删除账户',
            resourceUrl: '/api/v1/user/delete',
            key: 'user-account-delete',
            method: '',
            type: 'button',
          },
        ],
      },
      {
        name: '角色管理',
        resourceUrl: '/api/v1/userrole/page',
        method: '',
        key: 'user-role',
        type: 'page',
        children: [
          {
            name: '添加角色',
            resourceUrl: '/api/v1/userrole',
            key: 'user-role-add',
            method: '',
            type: 'button',
          },
          {
            name: '修改',
            resourceUrl: '/api/v1/userrole/*',
            key: 'user-role-update',
            method: 'PUT',
            type: 'button',
          },
          {
            name: '查看',
            resourceUrl: '/api/v1/userrole/*',
            key: 'user-role-detail',
            method: '',
            type: 'button',
          },
          {
            name: '角色删除',
            resourceUrl: '/api/v1/userrole/*',
            key: 'user-role-delete',
            method: 'DELETE',
            type: 'button',
          },
        ],
      },
      {
        name: '审批管理',
        resourceUrl: '/api/v1/approving',
        method: '',
        key: 'user-audit',
        type: 'page',
        children: [
          {
            name: '审核',
            resourceUrl: '/api/v1/approving/*',
            key: 'user-audit-check',
            method: 'PUT',
            type: 'button',
          },
          {
            name: '查看',
            resourceUrl: '/api/v1/approving/*',
            key: 'user-audit-detail',
            method: '',
            type: 'button',
          },
        ],
      },
    ],
  },
  {
    name: '事件中心',
    resourceUrl: '/dashboard/event',
    key: 'event',
    type: 'menu',
    children: [
      {
        name: '同意',
        resourceUrl: '/api/v1/event/*/operation',
        key: 'event-agree',
        method: '',
        type: 'button',
      },
      {
        name: '拒绝',
        resourceUrl: '/api/v1/event/*/operation',
        key: 'event-refuse',
        method: '',
        type: 'button',
      },
    ],
  },
  {
    name: '系统设置',
    resourceUrl: '/dashboard/setting',
    key: 'setting',
    type: 'menu',
    children: [
      {
        name: 'ip黑名单配置',
        resourceUrl: '/api/v1/config/ip-blacklist',
        method: '',
        key: 'setting-ipconfig',
        type: 'page',
      },
      {
        name: '日志空间容量预警',
        resourceUrl: '/api/v1/config/log-size',
        method: '',
        key: 'setting-logconfig',
        type: 'page',
      },
    ],
  },
  {
    name: '审计日志',
    resourceUrl: '/api/v1/user/log/page',
    key: 'log',
    type: 'menu',
    method: '',
  },
  {
    name: '跨链',
    resourceUrl: '/dashboard/cross-chain',
    key: 'cross-chain',
    type: 'menu',
    method: '',
    children: [
      {
        name: '通讯链',
        resourceUrl: '/api/v1/cross-chain/communication-chains',
        key: 'cross-chain-communication',
        type: 'page',
        method: '',
        children: [
          {
            name: '创建通讯链',
            resourceUrl: '/api/v1/cross-chain/communication-chains',
            key: 'cross-chain-communication-create',
            method: '',
            type: 'button',
          },
          {
            name: '申请跨链通讯',
            resourceUrl: '/api/v1/cross-chain/applications',
            key: 'cross-chain-communication-apply',
            method: '',
            type: 'button',
          },
          {
            name: '操作(同意/拒绝)',
            resourceUrl: '/api/v1/cross-chain/communication-chains/*/applications/*',
            key: 'cross-chain-communication-handle',
            method: '',
            type: 'button',
          },
        ],
      },
      {
        name: '部署合约',
        resourceUrl: '/api/v1/cross-chain/contracts',
        key: 'cross-chain-contracts',
        type: 'page',
        method: '',
        children: [
          {
            name: '新建合约',
            resourceUrl: '/api/v1/cross-chain/contracts',
            key: 'cross-chain-contracts-create',
            method: '',
            type: 'button',
          },
        ],
      },
      {
        name: '跨链申请',
        resourceUrl: '/api/v1/cross-chain/applications',
        key: 'cross-chain-applications',
        type: 'page',
        method: '',
      },
    ],
  },
]

